package server;


import java.util.UUID;

import common.Level;
import common.PlayerEvent;

public class GameStateGetReady extends GameControllerState {

	public static final long GET_READY_TIMEOUT = 1000;
	
	
	
	@Override
	public void initializeState(GameController c) {
		super.initializeState(c);
		
		controller.setTimer(GET_READY_TIMEOUT);
		game.setMessage("Fasten your seat belts and get ready");
	}
	
	
	@Override
	public void detachState() {
		controller.stopTimer();
	}
	
	
	@Override
	public void timerTick(int tick) {

		if (tick < 4) {
			game.setMessage("Game starting in " + (4 - tick) + " sec."); 
		} else {
			game.setMessage("Go !!!");
			controller.setState(new GameStatePlaying());
		}
	}
	
	
	
}
